Skip to content

Instantly share code, notes, and snippets.

@fstab
fstab / expecting.md
Created September 2, 2016 22:48 — forked from ksafranski/expecting.md
Basic principles of using tcl-expect scripts

Intro

TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl extension and a different #! call.

Setup Your Script

The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:

#!/usr/bin/expect

Splitting large commits that prevent push to GitHub

You have discovered some very large commits in a repo history that prevent pushing the repo to GitHub, even when attempting to do a chunked push. These commits are larger that the push limit of 2G.

There are a few options for dealing with these large commits to unblock pushing to GitHub.

  1. delete the commit
  2. split the commit

Both options will rewrite the repo history. Deleting the commit can be problematic if there are later commits that depend on the commit being deleted. Spliting the commit into smaller chunks is a better option. We have created the chunk commit script to help commit the files from the large c

@mattmc3
mattmc3 / optparsing_demo.zsh
Last active June 25, 2026 19:34
Zsh option parsing example
# Manual opt parsing example
#
# Features:
# - supports short and long flags (ie: -v|--verbose)
# - supports short and long key/value options (ie: -f <file> | --filename <file>)
# - supports short and long key/value options with equals assignment (ie: -f=<file> | --filename=<file>)
# - does NOT support short option chaining (ie: -vh)
# - everything after -- is positional even if it looks like an option (ie: -f)
# - once we hit an arg that isn't an option flag, everything after that is considered positional
function optparsing_demo() {
@JustAChucklin
JustAChucklin / modding_rdr2_on_linux.md
Created July 19, 2025 17:25
Modding RDR2 on Linux-Based Systems

How-to on Modding RDR2

Files

ScriptHook

  • Step 1 is you're going to need dinput8.dll for RDR2 move the dinput8.dll file from this archive located in /bin/ into the root RDR2 folder
  • Now download the ScriptHookV2 move the ScriptHookRDR2.dll into your main RDR2 folder (where the rdr2.exe file is located)

Congrats ScriptHook is now installed, we will finish the setup for this later.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@vwkd
vwkd / michael-burry-msn-articles.md
Last active June 25, 2026 19:24
Most Michael Burry MSN MoneyCentral articles. See comments in source for articles that weren't available in the Wayback Machine or might be missing.

MSN MoneyCentral - Strategy Lab - Value Doc - Dr. Michael Burry

Michael operates on out-of-favor industries to find best-of-breed companies trading at steep discounts.

Michael focuses on free cash flow and private market valuation as he scours out-of-favor industries and overlooked securities.

@FreddieOliveira
FreddieOliveira / docker.md
Last active June 25, 2026 19:23
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android ๐Ÿ‹๐Ÿ“ฑ

Edit ๐ŸŽ‰

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@jscott3201
jscott3201 / custom_pub_chat_template_gemma4.jinja
Created May 23, 2026 03:01
A drop-in replacement chat template for google/gemma-4-31B-it tuned for open-source agentic coding harnesses.
{#---------------------------------------------------------------------
custom_pub_chat_template_gemma4.jinja
=====================================
A public, harness-friendly fork of Google's Gemma 4 chat template,
tuned for open-source agentic coding harnesses like:
- anomalyco/opencode (https://github.com/anomalyco/opencode)
- earendil-works/pi (https://github.com/earendil-works/pi)
- openclaw, OpenHarness, similar Claude-Code-style harnesses
WHY THIS FORK EXISTS